let app = getApp()
function httpPost(url,data,fn,errfn){
	var token = app.globalData.user_token
	uni.request({
		url:'https://wzh.gzzww.cn'+url,
		//url:'https://ssgj.wzh.gzzww.cn'+url,
		data:data,
		header:{
			token:token
		},
		method:"POST",
		success: (res) => {
			fn&&fn(res.data)
		},
		fail: (res) => {
			errfn&&errfn(res)
		}
	})
}
function httpGet(url,data,fn,errfn){
	var token = app.globalData.user_token
	uni.request({
		url:'https://wzh.gzzww.cn'+url,
		//url:'https://ssgj.wzh.gzzww.cn'+url,
		data:data,
		header:{
			token:token
		},
		method:"GET",
		success: (res) => {
			fn&&fn(res.data)
		},
		fail: (res) => {
			errfn&&errfn(res)
		}
	})
}


module.exports = {
  httpPost: httpPost,
  httpGet: httpGet
}